Interacting with Stitch
The Stitch
utility class and the rest of the protocols here provide functionality for interacting with a MongoDB Stitch application. None of these classes or protocols are meant to be instantiated directly. All interaction with Stitch begins at the level of the Stitch
utility class.
-
Singleton class with static utility functions for initializing the MongoDB Stitch iOS SDK, and for retrieving a
See moreStitchAppClient
.Declaration
Swift
public class Stitch
-
The fundamental set of methods for communicating with a MongoDB Stitch application. Contains methods for executing Stitch functions and retrieving clients for Stitch services, contains a
See moreStitchAuth
object to manage the authentication state of the client, and contains aStitchPush
object to register the current user for push notifications. An implementation can be instantiated using theStitch
utility class.Declaration
Swift
public protocol StitchAppClient
-
A set of methods for retrieving or modifying the authentication state of a
See moreStitchAppClient
. An implementation can be instantiated with aStitchAppClient
instance.Declaration
Swift
public protocol StitchAuth
-
A protocol to be inherited by classes that need to take action whenever a particular
See moreStitchAppClient
performs an authentication event. An instance of aStitchAuthDelegate
must be registered with aStitchAuth
for this to work correctly.Declaration
Swift
public protocol StitchAuthDelegate : AnyObject
-
StitchPush can be used to get clients that can register for push notifications via Stitch.
See moreDeclaration
Swift
public protocol StitchPush
-
A set of methods and properties that represent a user that a
See moreStitchAppClient
is currently authenticated as. Can be retrieved from aStitchAuth
or from theStitchResult
of certain methods.Declaration
Swift
public protocol StitchUser : CoreStitchUser
-
The set of properties that describe a MongoDB Stitch user. See the documentation for
See moreExtendedStitchUserProfile
to see the additional fields available on this type.Declaration
Swift
public protocol StitchUserProfile : ExtendedStitchUserProfile
-
A protocol representing an identity that a Stitch user is linked to and can use to sign into their account.
See moreDeclaration
Swift
public protocol StitchUserIdentity : Decodable, Encodable
-
See moreStitchResult
holds the result to an asynchronous operation performed against the Stitch server. When the operation was completed successfully, it holds the result of the operation. When the operation fails, it contains aStitchError
object describing the reason for the failure.Declaration
Swift
public enum StitchResult<T>